home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d887.lha / X10Commander / X10.DOC < prev    next >
Text File  |  1993-07-16  |  12KB  |  272 lines

  1.  
  2.                                                                July 1993
  3.  
  4.                                X10 COMMANDER
  5.                              by Gregory MacKay
  6.  
  7.  
  8.                                 What is it?
  9.  
  10. X10 COMMANDER was created to allow owners of the X10(R) CP290 HOME CONTROL
  11. INTERFACE to program the 128 event capable interface or send direct
  12. commands through it to control lights, appliances, etc...
  13. _____________________________________________________________________________
  14.  
  15. COPYRIGHT NOTICE:
  16.  
  17.      This Software is protected by copyright law. It may not be copied or
  18.   used for or in connection with any commercial purpose. Any other use is
  19.   subject to acknowledgement of the author:
  20.  
  21.                                             Gregory MacKay
  22.                                             10 Cedar Road
  23.                                             Gloucester, Ontario
  24.                                             Canada, K1J 6L4
  25.                                             (613)746-8821
  26.  
  27.   X10 COMMANDER is freely distributable provided the program and
  28.   this documentation remain together and are not modified in any way.
  29. _____________________________________________________________________________
  30.  
  31. The program can be started through the CLI or the WORKBENCH. No parameters
  32. are required. The stack setting should not be a problem, but if you do
  33. have any then try increasing the stack.
  34.  
  35. The CP290 interface must be connected through the serial port for the
  36. X10 COMMANER to work. If it is not connected then X10 COMMANDER will
  37. display a warning message and exit.
  38.  
  39. If you don't have a cable, one can be made very easily as follows:
  40.  
  41.                 *** SOLDERING REQUIRED TO MAKE CABLE ***
  42.  
  43.  Locate the connector type under SERIAL PORT in the Amiga User's Guide.
  44.  Most Amigas use the DB25 male connector (standard RS232 serial connector).
  45.  
  46.  Locate the connector type in the PROGRAMMING GUIDE FOR ADVANCED PROGRAMMERS
  47.  that came with the CP290 interface. The connector is a 5 pin DIN socket.
  48.  
  49.  Both these connectors can be purchased at most electronic stores. As for
  50.  the cable, as long as it has at least three thin wires it should do.
  51.  I used a regular telephone cable which has four wires in it.
  52.  
  53.  Connect the DB25 pin #2(transmit) to the 5 pin DIN socket pin #2(receive).
  54.  Connect the DB25 pin #3(receive) to the 5 pin DIN socket pin #4(transmit).
  55.  Connect the DB25 pin #7(ground) to the 5 pin DIN socket pin #3(ground).
  56.  
  57. OR if you haven't purchased the CP290 interface yet, then I believe the one
  58. designated for the Apple Macintosh has a compatible cable(DB25 male).
  59. I haven't confirmed it though, so you had better double check at the store.
  60.  
  61.  
  62. OPERATION
  63.  
  64. The X10 COMMANDER was designed to be as intuitive as possible. All actions
  65. are mouse driven.
  66.  
  67. When X10 COMMANDER is started, the Base Housecode, current Time and Day will
  68. be uploaded to the program and displayed.
  69. Only one event will be active and the LOCATION text box will be activated
  70. for input. If the number of events exceeds ten, the scroll bar can be used
  71. to access the hidden events in the list.
  72. Command acknowledgements and errors are displayed in the MESSAGE BOX.
  73.  
  74. The housecodes range from A through P and the unitcodes range from
  75. 1 through 16 and are used to select the module to control.
  76.  
  77. The time can be set with two slider knobs, one for hours and the other
  78. for minutes.
  79. A box to the right of the slider gadgets contains the time values.
  80.  
  81. Days (SUNDAY through SATURDAY) can be selected by clicking on the buttons.
  82. When using days with WEEKLY and SECURITY, don't forget to pick one or more
  83. days or the event will not function!.
  84.  
  85. Modes (WEEKLY, SECURITY, TODAY, TOMORROW) can be cycled through by clicking
  86. on the button. (NORMAL, which is used in the programmers guide has been
  87. changed to WEEKLY for clarity).
  88.  
  89. WEEKLY: will perform it's function on a weekly basis on the days selected.
  90.  
  91. SECURITY: same as WEEKLY except it executes at a random time, from within one
  92.           hour after the time specified.
  93.  
  94. TODAY: will execute the event on that day only. Selecting days has no effect.
  95.  
  96. TOMORROW: will execute the following day only. Selecting days has no effect.
  97.  
  98. Functions (ON, OFF, DIM) can be cycled through by clicking on the button.
  99. ON: turns on a module.
  100. OFF: turns off a module.
  101. DIM: turns on a module at a specific dim level. (only lights can be dimmed)
  102. The DIM slider knob sets the dim intensity. 0(full dim) to 15 (full bright).
  103.  
  104. NOTE: The dimming slider gadget in X10 COMMANDER works the opposite way than
  105.       in the interface. Since it's easier to think of 0 being full dim
  106.       and 15 being full bright, it was changed from 0 being full bright and
  107.       15 being full dim.
  108.  
  109. * IMPORTANT *
  110.  
  111.  When issuing commands, the values used are taken from the event currently
  112.  selected. Therefore, if you decide to use an event that contains valid data,
  113.  then don't forget to return the data to its former values.
  114.  
  115.  The safest way to issue a command is to ADD an event, set the data to the
  116.  desired values, execute the command and then DELETE the event. This way
  117.  you don't interfere with events that contain valid data.
  118.  
  119.  Commands in X10 COMMANDER use only the data required for their execution.
  120.  Most commands do not require any input.
  121.  
  122.  
  123. The following is a description of each command and the input required for
  124. proper execution:
  125.  
  126.  GET CLOCK AND HC: no input required
  127.  
  128.   This command will upload the Base Housecode that the interface was last
  129.   set to, and will upload the current time and day from the interface.
  130.   Both these values will be updated in the program's window.
  131.  
  132.  SET TIME AND DAY:
  133.  Input: HOURS,MINUTES and ONE DAY ONLY
  134.  
  135.   To execute this command, use the slider knobs to set the HOURS and MINUTES
  136.   and select which day (ONLY ONE) from the seven buttons at the bottom of
  137.   the window. The buttons range from SUNDAY through SATURDAY and are toggle
  138.   select, meaning the button will switch from selected to unselected with
  139.   every click of the mouse.
  140.  
  141.  UPLOAD EVENTS: no input required
  142.  
  143.   This command will upload the events currently stored in the CP290 interface
  144.   to the computer and will load a file which contains text descriptions of
  145.   each event. This text file is created when the download command is executed
  146.   and is neccessary since the CP290 interface has too little memory to store
  147.   the descriptions. If it is the first time you use this program with the
  148.   CP290 interface and the interface already contains events, then
  149.   X10 COMMANDER will load the events and assign a name for each event.
  150.   ie. EVENT 1, EVENT 2, EVENT 3... This command may take some time to
  151.   complete depending on the number of events required to upload.
  152.  
  153.  DOWNLOAD EVENTS: no input required
  154.  
  155.   Will download all events in the list. When the download is complete,
  156.   a file containing the LOCATION and DESCRIPTION text will be written
  157.   to disk. The file is named 'X10Download_text' and will be used as input when
  158.   the UPLOAD command is used. This command may take some time to complete
  159.   depending on the number of events required to download.
  160.  
  161.  ADD EVENT: no input required
  162.  
  163.   Will add an event to the list. When an event is added, it is inserted at
  164.   the currently selected event, pushing the selected and all subsequent
  165.   events down by one. Using ADD EVENT and DEL EVENT it is possible to group
  166.   events to your liking.
  167.  
  168.  DEL EVENT: no input required
  169.  
  170.   Will delete the event currently selected from the list.
  171.  
  172.  LOAD: no input required
  173.  
  174.   Will load events that were saved with the SAVE command. A requester will
  175.   appear asking for the file to load.
  176.  
  177.  SAVE: no input required
  178.  
  179.   Will save all events currently listed to a file. A requester will appear
  180.   asking for a file name under which the events will be saved.
  181.  
  182.  DIRECT COMMAND:
  183.  Input: HOUSECODE, UNITCODE, FUNCTION
  184.  
  185.   This command allows house lights, appliances, etc. to be controlled at the
  186.   click of a button (THIS BUTTON). Select the HOUSECODE and UNITCODE of the
  187.   module you which to control, choose a FUNCTION (ON, OFF, or DIM)
  188.   and click on the DIRECT COMMAND button.
  189.   If DIM is selected then also select a DIM value. Values range from
  190.   0 (full dim) to 15 (full bright). The DIM function may take some
  191.   time (about 5 secs), be patient.
  192.  
  193.  CHANGE HC:
  194.  Input: HOUSECODE
  195.  
  196.   Will change the Base Housecode. The Base Housecode is used by the rocker
  197.   keys on the interface. It is initially set to A when the interface is
  198.   powered up. This command is a destructive one. When this command is
  199.   executed the CP290 interface will erase all the events it contained.
  200.   However, the list of events in the program will remain available so all
  201.   that needs to be done is to re-download the events.
  202.  
  203.  SELF TEST: no input required
  204.  
  205.   This command will initiate the self test diagnostic routine of the
  206.   interface which will check it's hardware and software(firmware).
  207.   When the self test executes it writes test data destroying all events.
  208.   Again, the list of events in the program will remain available so all
  209.   that needs to be done is to re-download the events.
  210.   Be patient, it may take about 10 seconds to complete the test.
  211.   The response will be either 'Interface OK' or 'Interface fault' or will
  212.   not respond at all, in which case you may have to reboot.
  213.   If you receive the 'Interface fault' message or get no response, then it
  214.   may be wise to return it to the store you bought it from as it might need
  215.   to be repaired or replaced.
  216.  
  217.  
  218. COMPATIBILITY:
  219.  
  220.  X10 COMMANDER was designed to be compatible from OS 1.3 and up. I've tested
  221.  it on my A1000 and my A4000 with no problems.
  222.  Requesters will function according to which library resides (ASL,ARP,NONE).
  223.  ASL library is the best of the bunch, while ARP is not quite as pretty and
  224.  no requester library is of course an ugly affair, but manageable.
  225.  
  226.  
  227. TIPS:
  228.  
  229.  If you'll notice, there is no 'NEW' option to start a new list. I did this
  230.  because the program starts with the list at 1 blank event and also because
  231.  space for more buttons was getting tight. So, if you need to clear the
  232.  list, either quit and restart the program or delete the events if there
  233.  aren't too many.
  234.  
  235.  If for some reason the CP290 interface contains invalid data and you upload
  236.  it, then you will need to clear the interface of this bad data. To do this
  237.  choose 'CHANGE HC' or 'SELF TEST', if you choose 'CHANGE HC' make sure you
  238.  pick the Base Housecode you want before executing this command.
  239.  After doing this quit the program and restart it because the erroneous data
  240.  will cause the program not to function properly.
  241.  
  242.  All communication from the computer to the CP290 interface and vice versa
  243.  is synchronous. When a command is sent to the interface, the interface
  244.  responds with an acknowledgement. In some rare cases that acknowledgement
  245.  for some reason or other may not complete (It's never happened to me but
  246.  I have simulated it). In any case, if this happens you will notice that the
  247.  program is locked up. To clear up the problem, press one of the rocker keys
  248.  on the interface which will cause it to send another acknowledgement and
  249.  complete the program's command. You may get a 'serial error' message but at
  250.  least your up and running again.
  251.  
  252.  All mouse button actions are buffered, meaning you can click on as many
  253.  buttons as you like and they will execute in sequence, one after another.
  254.  
  255.  
  256. ACKNOWLEDGEMENTS:
  257.  
  258.  The code for X10 COMMANDER is all mine except for the file requesters which
  259.  I got from the AmigaWorld Tech Journal "Easy File and Font Requesters" by
  260.  Willy Langeveld in Volume 2, Number 2, April 1992 and support disk.
  261.  I would like to thank Willy for his excellent article and code which I
  262.  integrated into my program with no fuss at all.
  263.  I would also like to thank AmigaWorld for publishing the article and for an
  264.  outstanding Amiga Technical magazine which unfortunately is no longer being
  265.  published.
  266.  
  267.  So, I hope this program will be useful to Amiga users who use the
  268.  CP290 Home Control Interface. It's my little contribution to the Amiga
  269.  Community and the Amiga computer. ENJOY!
  270.  
  271.  I can be reached on GENIE as 'G.MACKAY1'.
  272.